package sis.studentinfotest;/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-07-20 17:38
 * @notify
 * @version 1.0
 */

import junit.framework.TestCase;
import sis.studentinfo.DateUtil;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class DateUtilTest extends TestCase {

    public void testCreateDate(){
        Date date =  DateUtil.createDate(2000,1,1);
        Calendar calendar = new GregorianCalendar();
        calendar.setTime(date);
        assertEquals(2000,calendar.get(Calendar.YEAR));
        assertEquals(Calendar.JANUARY,calendar.get(Calendar.MONTH));
        assertEquals(1,calendar.get(Calendar.DAY_OF_MONTH));

    }
}
